/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author frederic
 */
import java.util.GregorianCalendar;
import java.util.Calendar;

public class Date {

private int jour;
private int mois;
private int annee;

public Date (int jour, int mois, int annee) {

	this.jour = jour;
	this.mois = mois;
	this.annee = annee;

}

public int differenceNombreDeJoursAujourdhui() {
	
	long dureeJourEnMinute = 1000l * 60 * 60 * 24;
 
	GregorianCalendar aujourdhui_temp = new GregorianCalendar();
	java.util.Date aujourdhui = aujourdhui_temp.getTime();
	
	GregorianCalendar date_temp = new GregorianCalendar();
	date_temp.set(Calendar.YEAR, this.annee);
	date_temp.set(Calendar.MONTH, this.mois-1);
	date_temp.set(Calendar.DAY_OF_MONTH, this.jour);
	java.util.Date date = date_temp.getTime();
	
	long diff = aujourdhui.getTime()- date.getTime();
	return (int) (diff/dureeJourEnMinute) + 1;
}


public String decrisToi() {
	return this.jour + "/" + this.mois + "/" + this.annee;
}
  //Test tortois

}